package com.wande.dataplatform.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wande.common.tenant.core.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据血缘实体
 *
 * @author wande
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("dp_data_lineage")
public class DataLineage extends TenantEntity {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 源表ID
     */
    private Long sourceTableId;

    /**
     * 目标表ID
     */
    private Long targetTableId;

    /**
     * 血缘类型: ETL, SQL, API
     */
    private String lineageType;

    /**
     * 转换逻辑
     */
    private String transformLogic;

    /**
     * 关联任务ID
     */
    private Long taskId;

    /**
     * 任务类型: ETL_TASK, DATA_DEV_TASK
     */
    private String taskType;

    /**
     * 项目ID
     */
    private Long projectId;

    /**
     * 状态: 0-禁用, 1-启用
     */
    private Integer status;
}
